<H2>Help! My webapp suddenly stopped serving content, what's gone wrong?</H2>
<P>
So, your webapp was humming along nicely when suddenly it stops working, and your log files are full of exceptions. You may see
log entries for style sheet files not found, compiled JSP classes not being found or some other static content missing. The
most frequent culprit on Unix systems is a <code>cron</code> job that periodically cleans out files in the system
temporary directory, usually <code>/tmp</code> or <code>/var/tmp</code>.  
<P>
This is bad news for a web-app because Jetty stores various kinds of files associated with it into this temporary location.  For
example, if your web-app is deployed as a war file, Jetty will uncompress it and run it from the tmp directory. If your web-app
also uses non-precompiled JSPs, then the generated class files also go into this tmp directory. Each web-app is given it's own
directory under the tmp location, named according to the context and port number, eg:
<PRE>
    /tmp/Jetty__8080___myContext/
</PRE>
<P>
Your solution to disappearing /tmp content is to either disable the cron job, or (more conscientiously) redefine the top level tmp directory.  You do this by restarting Jetty and setting the system property <code>java.io.tmpdir</code> to a directory other than the system default, eg:

<pre>
    java -Djava.io.tmpdir="/usr/mytmp" -jar start.jar myconfig.xml
</pre>

If you're on a Windows environment, then the system default location is typically c:\temp. In the same way as on Unix, you use the <code>java.io.tmpdir</code> property to change this.
<P>

<A HREF="index.html" TITLE="Back to JettyFAQ"><IMG SRC="/jetty/images/info_sm.gif" BORDER="0"><BR
CLEAR="bottom"> JettyFaq</A>
<BR><BR>
